package com.woniu.cms.client.core.service.impl;

import com.woniu.cms.client.core.entity.ClientCompetitor;
import com.woniu.cms.client.core.mapper.ClientCompetitorMapper;
import com.woniu.cms.client.core.service.IClientCompetitorService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.common.api.Result;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 该表是竞争对手基本信息表，储存竞争对手名称和联系方式等固定信息 服务实现类
 * </p>
 *
 * @author chenjiapeng
 * @since 2022-09-23
 */
@Service
public class ClientCompetitorServiceImpl extends ServiceImpl<ClientCompetitorMapper, ClientCompetitor> implements IClientCompetitorService {

    @Override
    public Result saveName(String bidcompetitorName) {

        System.out.println("bidcompetitorName = " + bidcompetitorName);

        boolean saveByName = baseMapper.saveByName(bidcompetitorName);

        return saveByName ? Result.ok() :Result.error();
    }
}
